<?php

namespace app\api\controller;

use app\api\logic\ShareLogic;
use app\api\validate\ShareValidate;

/**
 * 分享控制器
 * Class ShareController
 * @package app\shopapi\controller
 */
class ShareController extends BaseShopController
{
    /**
     * @notes 获取小程序码
     * @return \think\response\Json
     * @author ljj
     * @date 2023/2/28 5:08 下午
     */
    public function getMnpQrCode()
    {
        $params = (new ShareValidate())->goCheck('getMnpQrCode');
        $res = (new ShareLogic())->getMnpQrCode($params);
        if(true !== $res){
            return $this->fail(ShareLogic::getReturnData());
        }
        return $this->success('获取成功',['qr_code'=>ShareLogic::getReturnData()]);

    }
}